package com.jeejam.product.sdk.api;

import com.jeejam.framework.base.pojo.Pager;
import com.jeejam.product.sdk.dto.ProductArticleDto;

import java.util.List;
import java.util.Map;

public interface IProductArticleService {

	public void deleteById(int id);

	public ProductArticleDto getById(int id);

	public void save(ProductArticleDto productArticleDto);

	public void update(ProductArticleDto productArticleDto);

	public int counts();

	public Pager getPager(int currentPage, int pageSize);

	public List<ProductArticleDto> findAllByPage(int currentPage, int pageSize);

	public int countsByUserId(int userId);
	
	public int countsByType(String type);
	
	public int countsForNew();
	
	public int countsForHot();
	
	public int countsForRecommend();
	
	public List<ProductArticleDto> findForUserId(int userId, int page, int pageSize);
	
	public List<ProductArticleDto> findForNew(int page, int pageSize);
	
	public List<ProductArticleDto> findForHot(int page, int pageSize);
	
	public List<ProductArticleDto> findForRecommend(int page, int pageSize);
	
	public List<ProductArticleDto> findByType(String type, int page, int pageSize);
	
	public int getVotes(int id);
	
	public void updateViews(int id);
	
	public void updateVotes(int votes, int id);
	
	public void recommend(int id);
	
	public void cancelRecommend(int id);
	
	public void trash(int id);
	
	public void restore(int id);

	public List<ProductArticleDto> selectAllByPage(int page, int pageSize);

}
